#import <Foundation/Foundation.h>

typedef id(^ConvertFromDictionaryBlock)(NSDictionary* dictionary);

@interface WebService : NSObject

+(WebService*)webServiceWithUrl:(NSString*)url;
-(id)initWithUrl:(NSString*)url;
-(id)sendRequestFor:(NSString*)action withValues:(NSDictionary*)values error:(NSError**) error;
-(id)sendRequestFor:(NSString*)action error:(NSError**)error;
-(NSArray*)getModelsForAction:(NSString*)action withKeyName:(NSString*)keyName convertFromDictionaryBlock:(ConvertFromDictionaryBlock)block error:(NSError**)error;
-(NSArray*)getModelsForAction:(NSString*)action withKeyName:(NSString*)keyName withValues:(NSDictionary*)values convertFromDictionaryBlock:(ConvertFromDictionaryBlock)block error:(NSError**)error;

@end
